package com.personal.system.controller.content.web;

import com.personal.common.result.Result;
import com.personal.system.service.content.web.ApiFollowedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/blog/v1/followed")
@RequiredArgsConstructor
@Api(tags = "关注API-V1")
public class ApiFollowedController {

    private final ApiFollowedService followedService;

    @PostMapping(value = "/insertFollowed")
    @ApiOperation(value = "关注用户", httpMethod = "POST", response = Result.class, notes = "关注用户")
    public Result insertFeedback(String userId) {
        return  followedService.insertFollowed(userId);
    }

    @DeleteMapping(value = "/deleteFollowed")
    @ApiOperation(value = "取消关注用户", httpMethod = "DELETE", response = Result.class, notes = "取消关注用户")
    public Result deleteFollowed(String userId) {
        return  followedService.deleteFollowed(userId);
    }
}